import { DOMParser } from 'xmldom';
import XMLSerializer from 'xmlserializer'
import htmlDocx from 'html-docx-js'
import fs from 'node:fs'

// const htmlString = '<p style="color:red">Hello, world!</p>';
// const doc = new DOMParser().parseFromString(htmlString, 'text/html');
// const xmlString = XMLSerializer.serializeToString(doc);
// console.log(xmlString)

const htmlString = '<p style="color:red">Hello, world!</p>';
async function main() {
	const wordXmlString = await htmlDocx.asBlob(htmlString).text()
	console.log(wordXmlString);
	
}
// main()
console.log(htmlDocx.asBlob)
// export default angularParser